(global.webpackJsonp = global.webpackJsonp || []).push([ [ "pages/goods/detail/index" ], {
    "263b": function(t, o, e) {
        e.d(o, "b", function() {
            return i;
        }), e.d(o, "c", function() {
            return r;
        }), e.d(o, "a", function() {
            return n;
        });
        var n = {
            wkSkeletons: function() {
                return e.e("components/wk-skeletons/index").then(e.bind(null, "5375"));
            },
            shoproSku: function() {
                return e.e("components/shopro-sku/shopro-sku").then(e.bind(null, "a743"));
            },
            shoproEmpty: function() {
                return e.e("components/shopro-empty/shopro-empty").then(e.bind(null, "69d8"));
            }
        }, i = function() {
            var o = this, t = (o.$createElement, o._self._c, o.goods.title ? 1 == o.goods.is_sku && "waiting" !== o.activityRules.status && o.checkActivity(o.goods.activity_type, "groupon") : null);
            o._isMounted || (o.e0 = function(t) {
                return o.tools.previewImage(o.goods.thumbs, o.swiperCurrent);
            }, o.e1 = function(t) {
                o.showSku = !0;
            }), o.$mp.data = Object.assign({}, {
                $root: {
                    m0: t
                }
            });
        }, r = [];
    },
    "54c1": function(t, o, e) {
        var n = e("f976");
        e.n(n).a;
    },
    6537: function(t, o, n) {
        (function(t) {
            n("767a"), e(n("66fd"));
            var o = e(n("cfec"));
            function e(t) {
                return t && t.__esModule ? t : {
                    default: t
                };
            }
            wx.__webpack_require_UNI_MP_PLUGIN__ = n, t(o.default);
        }).call(this, n("543d").createPage);
    },
    a4b7: function(t, n, i) {
        (function(e) {
            function o(o, t) {
                var e, n = Object.keys(o);
                return Object.getOwnPropertySymbols && (e = Object.getOwnPropertySymbols(o), t && (e = e.filter(function(t) {
                    return Object.getOwnPropertyDescriptor(o, t).enumerable;
                })), n.push.apply(n, e)), n;
            }
            Object.defineProperty(n, "__esModule", {
                value: !0
            });
            var t = {
                components: {
                    shServe: function() {
                        i.e("pages/goods/detail/children/sh-serve").then(function() {
                            return resolve(i("7027"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    shPrice: function() {
                        i.e("pages/goods/detail/children/sh-price").then(function() {
                            return resolve(i("66a7"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    shGroupon: function() {
                        i.e("pages/goods/detail/children/sh-groupon").then(function() {
                            return resolve(i("1673"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    shCoupon: function() {
                        i.e("pages/goods/detail/children/sh-coupon").then(function() {
                            return resolve(i("fe05"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    shGrouponTip: function() {
                        i.e("pages/goods/detail/children/sh-groupon-tip").then(function() {
                            return resolve(i("e704"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    shoproSku: function() {
                        i.e("components/shopro-sku/shopro-sku").then(function() {
                            return resolve(i("a743"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    shComment: function() {
                        i.e("pages/goods/children/sh-comment").then(function() {
                            return resolve(i("c835"));
                        }.bind(null, i)).catch(i.oe);
                    },
                    shoproEmpty: function() {
                        i.e("components/shopro-empty/shopro-empty").then(function() {
                            return resolve(i("69d8"));
                        }.bind(null, i)).catch(i.oe);
                    }
                },
                data: function() {
                    return {
                        currentSkuText: "",
                        detailType: "",
                        showShare: !1,
                        buyType: "sku",
                        grouponBuyType: "alone",
                        showSku: !1,
                        showServe: !1,
                        tools: this.$tools,
                        goods: {},
                        commentList: [],
                        is_collect: !1,
                        activityRules: {},
                        currentSkuList: [],
                        confirmgoods: {},
                        swiperCurrent: 0,
                        tabCurrent: "tab0",
                        emptyData: {
                            img: "/static/imgs/empty/comment_empty.png",
                            tip: "暂无评价~"
                        },
                        tabList: [ {
                            id: "tab0",
                            title: "商品详情"
                        }, {
                            id: "tab2",
                            title: "用户评价"
                        } ]
                    };
                },
                computed: function(n) {
                    for (var t = 1; t < arguments.length; t++) {
                        var i = null != arguments[t] ? arguments[t] : {};
                        t % 2 ? o(Object(i), !0).forEach(function(t) {
                            var o, e;
                            o = n, t = i[e = t], e in o ? Object.defineProperty(o, e, {
                                value: t,
                                enumerable: !0,
                                configurable: !0,
                                writable: !0
                            }) : o[e] = t;
                        }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(n, Object.getOwnPropertyDescriptors(i)) : o(Object(i)).forEach(function(t) {
                            Object.defineProperty(n, t, Object.getOwnPropertyDescriptor(i, t));
                        });
                    }
                    return n;
                }({}, (n.default = void 0, i("26cb").mapState)({
                    cartNum: function(t) {
                        return t.cart.cartNum;
                    }
                })),
                onLoad: function() {
                    var t = this.$Route.query, o = t.type;
                    "score" === (this.detailType = o, this.goods_id = t.id, o) ? this.getScoreDetail() : this.getGoodsDetail();
                },
                onReady: function() {},
                beforeRouteLeave: function(t, o, e) {
                    console.info("leave"), e();
                },
                methods: {
                    getActivityRules: function(t) {
                        t && (this.activityRules = JSON.parse(t));
                    },
                    checkActivity: function(t, o) {
                        return !t || !t.includes(o);
                    },
                    goCart: function() {
                        this.$Router.pushTab({
                            path: "/pages/index/cart"
                        });
                    },
                    jump: function(t, o) {
                        this.showShare = !1, this.$Router.push({
                            path: t,
                            query: o
                        });
                    },
                    goHome: function() {
                        this.$tools.routerTo("/pages/index/index");
                    },
                    swiperChange: function(t) {
                        t = t.detail.current;
                        this.swiperCurrent = t;
                    },
                    onTab: function(t) {
                        this.tabCurrent = t;
                    },
                    getScoreDetail: function() {
                        var o = this;
                        this.$api("goods.goods_detail", {
                            m: "wk_mall_plugin_jfsc",
                            goods_id: this.$Route.query.id
                        }).then(function(t) {
                            0 == t.errno && (o.goods = t.data.goods);
                        });
                    },
                    getGoodsDetail: function() {
                        var o = this;
                        o.$api("goods.goods_detail", {
                            goods_id: o.goods_id
                        }).then(function(t) {
                            console.info(t), 0 == t.errno && (o.goods = t.data.goods, o.is_collect = t.data.is_collect, 
                            o.getPoster(), o.getCommentList());
                        });
                    },
                    getCommentList: function() {
                        var o = this;
                        o.$api("goods.comment_list", {
                            goods_id: o.goods.id,
                            per_page: 3,
                            type: "all"
                        }).then(function(t) {
                            0 === t.errno && (o.commentList = t.data.list);
                        });
                    },
                    getPoster: function() {
                        this.$api("poster.goods_poster", {
                            goods_id: this.goods.id
                        }).then(function(t) {
                            t.errno;
                        });
                    },
                    changeType: function(t) {
                        this.buyType = t;
                    },
                    getSkuText: function(t) {
                        this.currentSkuText = t;
                    },
                    onShare: function() {
                        this.showShare = !0;
                    },
                    addCart: function() {
                        Boolean(e.getStorageSync("userInfo")) ? (this.buyType = "cart", this.showSku = !0) : this.$store.commit("LOGIN_TIP", !0);
                    },
                    goPay: function() {
                        Boolean(e.getStorageSync("userInfo")) ? (this.buyType = "buy", this.showSku = !0) : this.$store.commit("LOGIN_TIP", !0);
                    },
                    payGroupon: function(t) {
                        Boolean(e.getStorageSync("token")) ? (this.grouponBuyType = "groupon" === t ? "groupon" : "alone", 
                        this.buyType = "buy", this.showSku = !0) : this.$store.commit("LOGIN_TIP", !0);
                    },
                    goSeckill: function() {
                        Boolean(e.getStorageSync("token")) ? "waiting" !== this.activityRules.status ? (this.buyType = "buy", 
                        this.showSku = !0, console.log(this.buyType)) : this.$tools.toast("秒杀暂未开始") : this.$store.commit("LOGIN_TIP", !0);
                    },
                    onFavorite: function(t) {
                        var o = this;
                        Boolean(e.getStorageSync("userInfo")) ? o.$api("goods.collect", {
                            goods_id: t
                        }).then(function(t) {
                            0 === t.errno && (o.is_collect = t.data.is_collect, o.$tools.toast(t.data.msg));
                        }) : this.$store.commit("LOGIN_TIP", !0);
                    }
                }
            };
            n.default = t;
        }).call(this, i("543d").default);
    },
    c549: function(t, o, e) {
        e.r(o);
        var n, i = e("a4b7"), r = e.n(i);
        for (n in i) "default" !== n && function(t) {
            e.d(o, t, function() {
                return i[t];
            });
        }(n);
        o.default = r.a;
    },
    cfec: function(t, o, e) {
        e.r(o);
        var n, i = e("263b"), r = e("c549");
        for (n in r) "default" !== n && function(t) {
            e.d(o, t, function() {
                return r[t];
            });
        }(n);
        e("54c1");
        var s = e("f0c5"), i = Object(s.a)(r.default, i.b, i.c, !1, null, null, null, !1, i.a, void 0);
        o.default = i.exports;
    },
    f976: function(t, o, e) {}
}, [ [ "6537", "common/runtime", "common/vendor" ] ] ]);